Skip to content

dedupe windowed libraries at the end#5482

Merged
adhami3310 merged 2 commits into
mainfrom
dedupe-windowed-libraries-at-the-end
Jun 20, 2025
Merged

dedupe windowed libraries at the end#5482
adhami3310 merged 2 commits into
mainfrom
dedupe-windowed-libraries-at-the-end

Conversation

@adhami3310
Copy link
Copy Markdown
Member

i'm using index == index because the list is typically short

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Modified compiler to deduplicate window libraries before template rendering in reflex/compiler/compiler.py, using list comprehension with index comparison.

  • Added deduplication logic in _compile_app function using O(n²) index comparison approach
  • Implementation choice uses simple list comprehension since window library lists are typically short
  • Note: Performance impact negligible for current use case but could be optimized if list sizes grow

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Comment thread reflex/compiler/compiler.py Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 20, 2025

CodSpeed Performance Report

Merging #5482 will not alter performance

Comparing dedupe-windowed-libraries-at-the-end (5c9c85d) with main (6a29fbf)

Summary

✅ 8 untouched benchmarks

@adhami3310 adhami3310 merged commit 5ed8704 into main Jun 20, 2025
41 checks passed
@adhami3310 adhami3310 deleted the dedupe-windowed-libraries-at-the-end branch June 20, 2025 21:21
masenf pushed a commit that referenced this pull request Jun 26, 2025
* dedupe windowed libraries at the end

* use list dict fromkeys

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants